<?php

namespace Trawind\Extension\Models\Deploy;

use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;
use Trawind\Extension\Models\Custom\Field;
use Trawind\Extension\Traits\CustomData;

/**
 * Class BusinessTypeQueryer.
 *
 * @package namespace Trawind\Extension\Models\Deploy;
 */
class BusinessTypeQueryer extends Model implements Transformable
{

    use TransformableTrait, CustomData;

    protected $table = 'deploy_business_type_queryers';

    public $timestamps = false;

    public $incrementing = false;

    protected $connection = 'mysql';

    public function foreignField()
    {
        return $this->hasOne(Field::class, 'id', 'foreign_field_id');
    }

    public function localField()
    {
        return $this->hasOne(Field::class, 'id', 'local_field_id');
    }

}
